perm filename MAXTEX.MMD[UP,DOC]1 blob sn#543218 filedate 1980-11-20 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00013 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	NEWS:
C00011 00003					TEX Macros
C00015 00004			Instructions to use the Macros Templates Example
C00019 00005	CODMAC: Macros for non-justified text (programs, graphics, etc)
C00023 00006	ESPMAC: Macros para espanol
C00025 00007	KERMAC: The basic set of macros
C00033 00008	MATMAC: Macros for Mathematics
C00036 00009	PAPMAC: Macros for papers, reports, thesis, etc.
C00048 00010				       Page Design
C00058 00011			 Counters, Boxes, Files, Counter variables
C00061 00012				Index of control sequences
C00077 00013				   Appendix: "E" macros
C00081 ENDMK
C⊗;
NEWS:

[42] \neqno, \nleqno always set eq. nos. in \rm -- 22 oct.

[41] Better macros for letters. Copy & adapt LETT.TEX[TEX,MMD]. -- 22 oct.

[40] Null lines now generate blank line in \nofill mode.  -- 20 oct

[39] Space changed from \xskip to \quad in \stmt (\thm, lem, etc.). -- 20 oct

[38] New macros \mattwo, \scst, \scscst, \emptyset, \diam, \dist, \osc, \psubset,
     \psupset, \charfn, \QED, for math.  -- 29 sep.

[37] Renewed MAXTEX, with font cmti8 corrected (now in [xgp,sys]) -- 23 sep.

[36] Fixed bug in \displayypar. -- 20 sep.

[35] Some macros for letters appear in file LETMAC.TEX.  These are
     currently set for my letters, but may be copied and adapted. --- 16 sep.

[34] Running heads. Some inconsistencies fixed for chapters without sections.
     See also new macro \rhswap. -- 7 sep.

[33] Roman  numerals  may  be  used  for  chapter numbers.      Case may be
     chosen (\chapnumcase) -- 5 sep.

[32] Many new macros for figures and tables, including an optional "table of
     plates" (tables & fig) similar to t. of c.  Format of caption may be chosen
     among three provided. -- 5 sep.

[31] Fixed problem of overlong lines in file9 (t. of c.); should be no problem
     now. -- 5 sep.

[30] Bugs detected and fixed. \ctrcol, \rjustcol now really justify to size, not
     natural size.  Also, bug fixed in t. of c. when more than one chapter is
     used. -- 5 sep.

[29] Renewed maxtex, including added fonts.  DO NOT USE font J (cmti8), which
     will cause TEX go amuck. To be redone soon. -- 4 sep.

[28] \listnotes becomes now \chaplistnotes and \seclistnotes and box is not erased
     begining each chapter; only when listed. Debugged -- 3 sep.

[27] New headline style; see \ctrheadline, \ctrchapfmt. New macros for floating
     figures and tables: \figuref and \tablef.   "New" page style \onelineheading --
     3 sep.

[26] Macros \figure and \table modified; type units in #1 (e.g. \figure{20pt}{bla
     bla} -- 2 sep.

[25] \headline now uses macros mentioned in [20] (you'll probably need not change
     what you had); it allows breaking a long line. Details below. Disappeared
     macro \bighd. -- 2 sep.

[24] Cleanups: disappeared \romannm (variable) and \chapname, \sectionname,
     \subsecname; all were really useless. -- 2 sep.

[23] New defines \rhtypeface (\eightpoint), \tofctypeface (\ninepoint). You
     now change fonts (\rm, \ti, etc.) in headers and t. of c., and they will
     be typeset correctly. -- 2 sep.

[22] See \. (and explanation below) to fix the spacing problem with footnote
     numbers. -- 27  aug.

[21] New macros \izq and \chapskippage -- 26 aug.

[20] New alignment macros \lftcol, \ctrcol, \rtcol; similar to \lpile,
     \cpile, \rpile -- 26 aug.

[19] New \displayypar; like \displaypar, but with smaller width. --24 aug.

[18] Some cleanups.  \tencaps and \eightcaps disappear; instead, use \caps in
     \eightpoint or \tenpoint.  Disappeared aliases \bar (\overtext) and \under
     (\undertext). --  24 aug.

[17] Disappeared \lreqno; there seems to be no efficient way select between
     \leqno and \eqno. There are, however, \neqno and \nleqno for automatic
     numbering. -- 23 aug.

[16] New macro \capitalpar, to put a big capital -- 22 aug.

[15] \ref improved (and changed, but should work as before) -- 22 aug.

[14] Bug in \comment and \ifnull fixed. -- 21 aug.

[13] To allow roman numerals, \enumerate has now one parameter. To use as
      before, replace by \enumerate1.   See also new macros \enumelett &
      satellites. -- 20 aug

[12] New macros \indentin, \indenthin (do not work as before); take a look at
     that section in KERMAC. -- 15 Aug.

[11] New macros \itemize, \enumerate, and satellites; SCRIBE-type. -- 14 aug.

[10] New macros \bracedef, \¬, \hmode, \bye. See index below. -- 14 aug.

[9] Restructured chapter, section, subsection handling.  Some macros are new;
    some disappeared.  Take a look at PAPMAC/2p.  All documented below. -- 31 jul.

[8] New parameter \footntsize (currently = size). -- 29 jul.

[7] \count8 counts chapter numbers (so to start at chapter 5: \setcount8 5).
    Disappeared \varchap. Also, \consnum has only one parameter.
    Variable \chapnum holds current chapter number.  You may also have now
    chapters numbered in roman numerals (\count8 negative). -- 29 jul.

[6] Added \stmtfnt: the font used in theorems, lemmas, etc. -- 25 Jul. 1980

[5] Use \constofc to add entries to the table of contents. -- 25 jul. 1980

[4] NINMAC disappears; now included in KERMAC. That means \ninepoint included
    OK. -- 25 jul. 1980

[3] A bunch of new fonts; macros are now incompatible with both  TEX and 
    ARKTEX -- 25 jul. 1980

[2] Watch out \ti is meant for italic text, not \it as before -- 25 jul. 1980

[1] You can now use preloaded version MAXTEX. -- 25 jul. 1980
				TEX Macros


    The macros  are partitioned  in several  files (sets),  for  different
applications.  This has the prurpose  of avoiding the input of  unnecesary
junk (at the cost of messing up your terminal's screen when running TEX).

    Individual files have brief comments before each macro.  This file has
somewhat   more   technical   description   of   contents,   applications,
restrictions, and functioning of  each set (and  subset).  In some  cases,
hints are given for rewritting or  improving some of the more  complicated
macros (page styles, for instance). Few TEX standard macros have been  re-
defined, so what the TEX manual describes will also work with our  macros.
Exceptions are:

	\lg, \Pr deleted
	\ti used for italic TEXT, not \it (see p. 74)
	\emptyset redefined (original is UGLY).

    Some of the macros were borrowed  from (or inspired on) the  following
sources:

			basic.tex[1,3]
			macros.tex[tex,ark]
			errata.txt[tex,dek]
			macros.tex[tex,jp]

or from the TEX manual (TEX & METAFONT, 1979).

    Comments, suggestions and additions are welcome:

		mmd @ sail

or Max Diaz @384D (Math. Dept.).  Bug reports  are  not welcome, but  will
be given due attention.



			Organization of this File


    For each set, there is a general  description of its usage and of  the
restrictions for  its use  (for  instance, you  should not  \input  PAPMAC
before KERMAC).  You will probably want to start by reading the section on
KERMAC, the kernel, together with a listing of it.

    At the end we give several indexes of variables and control sequences.
You should not redefine  any of these in  your manuscript without  reading
the instructions provided; there is no internal checking of errors, so you
may get weird TEX error messages.

    The combination \input kermac \input matmac gives the same results  as
(and contains) basic.tex (which you should NOT input).




			       Running TEX


    The TEX version to  use is MAXTEX[1,3], which  is a preloaded   version
(has information on the fonts used) and hence runs faster than TEX.  MAXTEX
is, of course, pronounced "majtex".
		Instructions to use the Macros; Templates; Example

.r maxtex
*\input kermac

	{Then input (one or more) secondary sets of macros:
  
		PAPMAC	 for papers, reports (headings, chapters, etc)
		MATMAC    for math
		ESPMAC    para texto en espanol; acentos, e~ne, etc.
		CODMAC	 for programs, graphics, & non-justified text

	{Read last page of files to check initializations made;  these may be
	  re-defined at this point. This files are all in are [1,3].

	{Your text.

*\end

    There is an example,  file TESMAC.TEX[TEX,MMD], which  you may print  to
get an idea of the capabilities of the macros:

.r maxtex
*\input tesmac[tex,mmd]

and later on you may  er-ead it to see how some things were done.




    Here is  a template  for a  special appplication  (see also  the  more
elaborate example in  \tableofcontents below,  and also  in file  tesmac).
This example  is  for a  report  (or paper)  kind  of document,  where  no
chapters are used (only sections and subsections).

%%% macros:
\input kermac
\input papmac
	% These two macros described below (Page Design). Use only for special
	% running-heads; otherwise omit and use defaults:
\def\projheading{\onelineheading\oneside\let\nlnhdng=\prjhdng}
\def\prjhdng#1#2{\hdrfnt\projname\hfill\date\hfill\topnum\count0}
	% Set parameters to taste (may also be omitted):
\let \tit=\dunhill
\parskip .1vu			% space between paragraphs
\parindent 0pt			% no indentation on crown lines
	% Initializations
\def\projname{Project ``PEAS''}	% text on left of running heads
\def\date{August 15, 1980}	% text on center (page number on right).
\projheading			% initialize

%%% the first page:
\titlepage
\ctrcol{\ninepoint\cr
	\halskip{.75vu}{\Tit \projname
			\footnote*{Research supported by ``Save the Ants''}}\cr
	\halskip{1.5vu}by\cr R. Schockley and H. Kcizinger}
\vfill
\ctrcol{\ninepoint
	Parapsychology Department\cr\halskip{5pt}
	Occult Sciences University\cr\halskip{3pt}
	\date}
\eject

%%% text begins:
\arabicnumbering{1}
\null\vskip .5vu
\sectionbegin{An Erratic Visitor's Impression of an Ant Colony}

CODMAC: Macros for non-justified text (programs, graphics, etc)


			      *Description*

    This macros  take several  lines  of text,  and outputs  them  without
justification.  This is useful for typesetting programs or graphics (using
one of  the fonts  grfx).   The basic  macro is  \nofill;  it is  used  as
follows:

{\nofill

	<non-justified lines>

}

which will then output  those lines verbatim  in the current  font--you'll
probably want either \ttwr  or \grafix.  These two  appear in the  control
sequences \typewrite and \grfxnof,  which take those  lines and produce  a
paragraph.  In  that case,  since \parindent  is probably  undesired,  you
should type:

{\typnoi

	<non-justified lines>

}\par

or, for graphics, \grfx (which includes \noindent).  A \par after the } is
recomended, as shown.

    You may also use the \hbox par <dim> control sequence (see errata.txt)
to box one such paragraph and then indent it or place it somewhere; e. g.,
to make a box 5 inches wide:

\save0\hbox par 5vu{\grfxnof

	<non-justified lines>

}

    As for the characters inside \nofill, you may type anything except  \,
{, } (which are defined as \\,  \{, \}), which will be interpreted as  TEX
control sequences.  ALL other characters  are disabled during \nofill  and
will therefore be typeset, except that TAB's will report you a funny error
message.



			      *Restrictions*

    You may use this set anytime after \input of KERMAC.  Most macros here
are easily transportable, however.



				 *Notes*

    The setting \baselineskip -1pt is to force the interline glue (manual,
p. 58) to be \lineskip = 0.

    The \nofill macro becomes really simple by means of the new \chcode=13
(see errata.txt).  Note we chose to use a local {\nofill <lines>}  instead
of  delimiting   with   two  control   sequences   (\beginnofill   <lines>
\endnofill); this  lets TEX  do  the job  of reconstructing  whatever  was
messed up within nofill mode.
ESPMAC: Macros para espanol



			      *Description*

    Allows accents with a single character("), which works for any  letter
and font (e.g. as"i and not  as\'\i).  The e\~ne (egne) is written  simply
~: for  instance espa~nol.  Both things  are possible  by use  of the  new
chcode←13. (It is not recomended to use  ' for accents in this way,  since
this character  is  used for  octal  codes  ('43) and  right  quotes  '').
EXCEPTION:  words accented in the last  letter must have \<sp> at the  end
(if you don't want it  to be eaten by TEX):   as"i\ ya se jodi"o\ la  cosa
(REWARD offered to (s)he who points out a way to put accents with a single
character, without exception).

    This set also translates words used by all the other sets of macros.

    Hyphenation penalty is increased to 100.  Hyphenation works often  for
spanish words.



			      *Restrictions*

    This set may be used with or without any of the other sets.



				 *Notes*

    See commands \espanol, \english in KERMAC.
KERMAC: The basic set of macros



			      *Description*

    This  is  the  kernel.   Contains  the  font  declarations  &  \chcode
assignations.  Except for a  few cases (noted), all  other sets depend  on
this one; at least for the section HACKS. The subsets are:

1. CODES, FONTS, etc.

    These are  taken  from  the  manual,  appendix  E.   There  are  minor
corrections:  more fonts, and  also the \ti has  been defined using  fonts
"cmti" (intended for text: see manual p. 74). There is also \it.

    Note family definitions require \usertenpoint (meant to be  redefined)
which initializes (e.g.   start with \rm)  \tenpoint.  See  initialization
section.

2. ESPANOL, ENGLISH

    All english words used in any macro are handled via \def.  To write  a
paper in  another language,  you  need only  redefine  these, as  done  in
ESPMAC.

3. GLUE, BOXES, etc.

    Mostly taken from basic.tex, except for \ljustline and \xxskip.   Note
\qquad could be defined as \hskip 2em in horizontal mode (see errata.txt).

    Macro \displaypar has as argument the paragraph to be displayed.   You
may use \hangindent inside  it: \displaypar{\hangindent 20pt  <paragraph>}
(see also below).  It is assumed that \hsize has default setting (6.25vu);
if modified, you  may have  to adjust \displayparsize  (hsize of  column).
Glue after \displaypar is \displayparskip,  which has default value  equal
to \parskip.  Note \displaypar uses \hbox par, described in errata.txt.

    Paragraph indentation  macros are  used as  \noindent: preceeding  the
paragraph in question.   The default  crown-indentation is  that given  by
\parindent; but it may be changed by redefining \indentcrownskip (e.g., if
former equals 40pt,  defining the  latter to be  -40pt, there  will be  no
crown-indent).

    The other macros,  \enumerate, \enumelett and  \itemize are also  used
preceeding the paragraph in question.  For the first two, the parameter is
the number (letter)  at which to  start; this will  be roman (lower  case)
numeral if you  say \enumerate{-2}.  Note  that, to change  the format  of
hanged  numbers,  you  need  only  redefine  \enumrnfmt,  \enumrlfmt   and
\itemzfmt respectively.   For  instance,  if parenthesis  are  desired  in
\enumerate, do

\def\enumrnfmt{({\bf\count7})\ }

Macros will take care of the rest.

    Finally, note you get nice effects by combining the above; e.g.

\displaypar{\enumelett{A} This paragraph will be displayed and identified
            by a hanged ``A.''}
\displaypar{\enumrind For the next paragraph you type \enumrind, as usual.}

and similarly for \itemize.

    For fairy tales and bibles, you may want to use  \capitalpar3{O}{\caps
nce upon a time \rm there was...}. Try it, you'll like it.


4. UNDERLINING, etc.

    All rather obvious.

5. HACKS

    For hackers to unhack.  Several of these macros are used in other sets
without comment.

6. PAGE NUMBERING, TITLEPAGES, PAGE FORMAT

    In the fashion  this set gets  initialized, you'll see  a page  format
similar to that in basic.tex.  There are, however, some parameters you may
combine to obtain a different effect.

    First, pages have  either \romannumbering  or \arabicnumbering;  these
appear at the bottom of pages in italic 10pt font.  Next, pages are  meant
to be used on \oneside or on \bothsides (for printing).

    Horizontally, pages  measure 8.5  inches (=  units "vu")  with a  left
margin of 1.25in  and a right  margin of  1in.  This is  true when  option
\oneside is set (default); when  \bothsides, the margins will be  reversed
on EVEN  numbered pages.   On  the vertical  dimension, the  upper  margin
measures .9375in and the bottom one 1.25in; discounting a strip of  .375in
at the bottom for the  numbering.  Macro \fullpages resets numbering,  and
allows use of the whole \vsize=8.75vu (see \epagesize) page.


7. INITIALIZATIONS

    Any of  these may  be modified  anytime after  the set  is input;  for
instance, \input kermac \bothsides.



			      *Restrictions*

    This file is meant to be input before any of the others.



				 *Notes*

    More details about the \output routine (& satellites) are given in the
section "Page design". The  routine needed for the  basic output could  be
much simpler;  this  somewhat messy  arrangement  nevertheless  simplifies
later routines (see also PAPMAC).

    There are several important "global  variables" in this set.   \ddvnum
(T or  F) is  set  by \bothsides,  and is  used  in the  output  routines.
Variable \tpage is set by \normalpage and reset by \titlepage; see  PAPMAC
(useless in this set).
MATMAC: Macros for Mathematics



			      *Description*

    Contains a set of primitives to typeset math:

1. OP, DOTS, PARENTHESIS

    Taken from basic.tex.  Most of these are explained in the manual.

2.ALIGNMENT, CHOP

    All of these control sequences are illustrated in the TEX manual.

3.THEOREMs, EQNOs

    Theorem numbers are kept in \varstmt;  the number assigned to a  \stmt
is then \varstmt if \count8=0 (no chapter declared), and  \count8.\varstmt
otherwise (see \consnum). That is, if \count8 = 0, \stmt's are  1,2,3,...;
and if \count8  = n  ≠ 0,  numbers are  n.1, n.2,...  (n may  be in  roman
capitals if n < 0).

    The TEX manual has another definition \thbegin which may be useful  if
numbers are not desired.  It is not included here, though.

    For equation numbers,  assuming \bothsides, \lreqno  numbers right  on
odd pages, and left on even pages.  It coincides with \eqno when \oneside.
Note new \leqno is used (see errata.txt).



			      *Restrictions*

    Aside from \lreqno (which uses \ddvnum), and \stmt, you may easily use
this set  independent of  any others.   Note KERMAC+MATMAC  works as,  but
contains, basic.tex.



				 *Notes*

    Counters  \count8,   \varstmt,   \vareqno   are   modified   only   by
\chapterbegin  in  PAPMAC.   Global  \ddvnum  is  assigned  by   \oneside,
\bothsides in KERMAC.
PAPMAC: Macros for papers, reports, thesis, etc.




			      *Description*

    This set designed  for more structured  text.  Contains facilities  to
declare  chapters,  sections,  etc.   This  information  is  then  handled
automatically in the  table of  contents and  in the  running heads  (also
called headings; we call "headline" the text announcing the begining of  a
chapter, section, etc).  Three designs  of pages are  provided.  There  is
also a bunch of utilities for footnotes, bibliography, figures, etc.

1. CHAPTERS, SECTIONS, SUBSECTIONS, ETC.

    All  these  are  used  to  declare  a  chapter,  section,  etc.    The
corresponding routine will generate an appropiate headline, as well as the
running-heads for the pages.

    Numbers are  assigned  automatically:   chapters reset  the  count  of
sections (so, first section in chapter 3 will be 3.1), and of  subsections
(first subsection in section 3.5 will be 3.5.1).  Similarly with  theorems
and  footnotes;  all  these  restart  at  1.

    There are two variations of sections and chapters:  the  "appendices".
These do not have an assigned number, but may have sections (num: 1,2,...)
and subsections  (num:  2.1,  2.1,  etc).   Note  \appchapterbegin  resets
\count8 to be 0 (see below).

    At any given  point, the  global variables  \chapnum, \sectionnum  and
\subsectionnum keep the chapter, section and subsection number.

    A minor disaster will  occur if you  type \chapterbegin{A veeery  long
title...}:  you'll get overfull boxes  in every heading. There are  macros
\chapterbeginb, \sectionbeginb,  etc.   to declare  a  long title  and  an
abreviation, which shall be  used everywhere except  in the headline.   If
this arrangement dissatisfies  you, try  calling \chapterdeclare  instead;
this has 3 parameters, and these need not use the same title.

    There are  two styles  of headlines:  \ctrheadline and  \ddvnheadline;
these are accesed by  \chapterbegin et al. via  the ghost macro  \headline
(see initialization section.

    Current headlines are not very suitable  for long titles; to split  in
several lines,  try  things  like \headline{First  line\cr  second  line}.
Since \chapterbegin uses \headline, you may want to type

\chapterbeginb{First line\cr second line}{Another title}

as an alternative to the abreviation problem.  At any rate, a chapter with
a very long title could perhaps use some rewritting...

    If you don't want chapters (say for a paper), set \count8 to be  zero:
\setcount8 0. In  this way,  \stmt, \sectionbegin, \lreqno  will OMIT  the
chapter number (unless you use \chapterbegin).   You may in that case  use
sections or subsections to get "paragraphs" 1, 2, 3, ...  Finally, setting
\count8 to be negative will use roman numerals (sections will then be I.1,
I.2, and so on).  The following  sequence of macros will redefine  heading
handling to  have section  numbers on even-numbered pages  and  subsection
names on odd-numbered pages:

	% Adjustments for headings:
\let\junkiesecdec=\sectiondeclare
\def\sectiondeclare#1#2#3{\junkiesecdec{#1}{#2}{#3}
	{\rhtypeface\xdef\rhevenpg{#3}}
	\titlemark{\rhevenpg}{\rhoddpg}}
\let\junkiesubsec=\subsectiondeclare
\def\subsectiondeclare#1#2{\junkiesubsec{#1}{#2}
	{\rhtypeface\xdef\rhevenpg{#2}}
	\titlemark{\rhevenpg}{\rhoddpg}}
\def\titlemarknchp#1#2{\titlemarknln{#2}{#1}}
\let\titlemark=\titlemarknchp

	% Change formats:
\def\sectionbeginb#1#2{\addq1{\varsec}
	\sectiondeclare{\hangindent\indsect
			\tit\sectionnum.\ \ #1\¬
		      }{\sectionnum.\ #2
		      }{\sectionnum\ #2} }


    Some further details are discussed in section Page Design.

2. FOOTNOTES, etc.


    Footnotes are  also  numbered  automatically  or  identified  by  some
character:   \nfootnote{note}  and  \footnote*{note},  respectively.    In
general, it  seems  standard  to  type  <...referred-to  text><punctuation
mark>\nfootnote{bla, bla}.  If the footnote  follows a period, there  will
be some space left after it, before the fn. number; if you don't like  it,
try putting  the period  after the  \footnote{...}.  Or,  to leave  little
space, try the control sequence \.

	... and bla bla\.\nfootnote{note}

or, finally, to put foootnote number  on TOP of punctuation mark:

	... and bla bla\spose{,}\nfootnote{note}

    For the \comment macro, you may find it useful to define your own:

		\def\cjls{\comment{\jls}}

to  save   some  typing.    Remember  \jls   must  be   defined:    either
\def\jls{jls}, or \def\jls{}.  The  comments will be  printed only in  the
first case (and identified by the value of \jls).

    For bibliographic references, the format is \ref{7}Schmeller, J.   \ti
Carmina Burana\rm  Stuttgart,  1847.\par; this  sets  "[7]  Schmeller...",
nicely indented.  To put a second  indented paragraph, use \refind in  the
same way as done in \enumerind.

3. TABLE OF CONTENTS

    To generate the table of contents, type \tableofcontents at the end of
your MS.  The parameter is the roman number at which numbering will start.

    Table  will  be  constructed  using  titles  given  in  \chapterbegin,
\appchapterbegin, \sectionbegin,  \subsectionbegin, \appsectionbegin,  and
\{chap,sec}listnotes  (title=\Notes).   If you  must add an  entry to  the
table, use \constofc; however, notice you may want to use \appchapterbegin
or \appsectionbegin instead (these besides  set a headline and handle  the
headings).

    The final organization of a MS is as follows:

*\input kermac
*\input papmac
*\input matmac			% (for instance)
*\romannumbering{2} 		% start at page ii (page i = front page)
*\oneside			% optional -- if following 4 (say)   pages
				%   will be printed on one side only

	{First  pages  of   text:   abstract,  preface,   acknowledgements,
	   dedication, etc. ---  not  to  be included  in  t. of  c.   Use
	   \titlepage for EACH of these, to remove headings.

*\arabicnumbering{1}
*\topboxes 			% or any page style (but select one!)

	{The text: chapters, sections, etc.

*\tableofcontents{6}		% do t. of c.; number page vi, vii, etc.
*\end

   Note setting \tableofcontents{-6} will number with arabic numerals.

4. PAGE STYLES

    In  addition   to   the   page   parameters   described   in   KERMAC:
\romannumbering, \arabicnumbering, \oneside or \bothsides, there are  here
also \titlepage's  and  \normalpage's.  The  former  do not  have  running
heads, but the latter,in  the appropiate style,  will have information  at
the top on the most recent chapter and section declared in the page.

    Now, in addition to style \noheading, already defined in KERMAC,  with
these set you may  choose between \bottomnumbering, \oddevennumbering  and
\topboxes.    The  last two  are meant  (and initialized)  for  \bothsides
(they'll look ugly with \oneside, but no chaos will occur); the two others
work well with either option.

    In all four  styles, \titlepage's do  not have a  heading.  In  styles
\topboxes   and \oddevennumbering, a \titlepage is NOT numbered unless  in
\romannumbering. In the two other styles, all pages are always numbered at
bottom.

    For more details, see section "Page Design".

5. INITIALIZATIONS

    Take a look  at them.   Note the  use of  \inivar to  set the  counter
variables \varfn, etc.; you may  do this at any  point in your MS.   Also,
keep in mind the useful \count8 = 0 described above.
			       Page Design


    Things have been arranged in such a way that it is easy to reshape the
pages produced by the  output routines. Most  skips, dimensions and  fonts
are handled by means  of macros (all  these marked "par"  or "fnt" in  the
index), which may be altered by redefining the latter.

1. DIMENSIONS, MARGINS.

			\hsize
			\hshft
			\shftthepage
			\epagesize

    Page (the area where you can  put ink) dimensions are given by  \hsize
and \epagesize.  TEX parameter \hsize may take any value from 0 to  8.5vu;
parameter \epagesize may  take any value  between 0 and  ∞, but only  with
current value (8.75vu), sheets will measure exactly 11vu high.

    Vertical margins  are fixed:  .9375vu at  the top,  1.25vu at  bottom.
Horizontal margins are:   left = \hshft  + 1.125vu and  right = 1.125vu  -
\hshft, on odd-numbered pages (with usual convention for \oneside and even
pages).  This parameter may be changed to any value provided the above  is
feasible.

    Remember full pages are accesible with \fullpages.

2. PAGE SETUP.

			\thevbox
			\vsize
			\thepage
			\titpage
			\cbotnum
			\numonlyrmn
			\btmnrspace

    Pages are,  then,  put  together  by  \thevbox  and  "pasted"  in  the
appropiate place of sheets as described above. Macro \thevbox takes a list
of boxes and \vbox'es  them to \epagesize.  In  that big box are  included
headings (if any), the \page (your text: a box \hsize x \vsize constructed
by TEX) and, perhaps, numbers  at the bottom (see \cbotnum,  \numonlyrmn).
That list  may of  course  be a  \titpage  (when \titlepage)  or  \thepage
(\normalpage).

    For  instance,  page  style  \noheading  defines  \thepage  as  {\page
\cbotnum}, where  \cbotnum is  a \vbox  of height  \btmnrspace  (currently
.375vu) containing the page number, be  it roman or arabic.  To make  this
fit into \thevbox, naturally a \vsize  of 8.375vu is declared.  There  are
no \titlepage's in this style, so \titpage = \thepage.

    In this way, one may easily  change the VISIBLE vertical margins;  say
you want \noheading style but with 1.5vu blank both at top and at  bottom;
then

	\def\thepage{\null\vskip .5625vu 	% 1.5 - .9375
		     \page\cbotnum
		     \vfill}			% \vfill = \vskip .25vu

	\let \titpage=\thepage

and then, of course,

	\vsize 7.5625vu		% 8.75-.5625-.375-.25

(we shall one day write a nice macro to set up margins).

    Other styles fill \thepage and \titpage in different ways (headings at
the top, e.g.), and then adjust \vsize to make those two fit in  \thevbox.
We shall see an example below.

3. RUNNING HEADS.

			\chapterdeclare
			\sectiondeclare
			\titlemark
			\rhevenpg
			\rhoddpg
			\titlemarknh
			\titlemarkbtm
			\titlemarkcrn
			\titlemarknln
			\onelinh
			\boxh
			\ddvnmsel
			\ddvnhdng

    Routines     \chapterbegin,      \appchapterbegin,      \sectionbegin,
\appsectionbegin,  and  \tableofcontents  shall   invoke  a  ghost   macro
\titlename{\rhevenpg}{\rhoddpg} which sets up  appropiate headings in  the
form \mark{  <heading>  }.   The  invocation shall  be  with  \rhevenpg  =
chapter, \rhoddpg = section; and the first will not be modified except  by
\chapterdeclare; the second only by \sectiondeclare.

    You may in this way easily put other running heads.  Say, with \count8
= 0 (no chapters), you may put \def\rhevenpg{ The Paper's Name }.  In  any
style other than \noheading, non \titlepage's will have headings with  the
declared  section  titles   and  The   Paper's  Name   (unless  or   until
\chapterdeclare).

    As another instance, suppose you want a heading consisting of one line
(as in \oddevennumbering style), meant for \oneside, having some \projname
on the left, a centered \date and the page number to the right; then:

\def\projheading{\onelineheading\oneside\let\nlnhdng=\prjhdng}
\def\prjhdng#1#2{\hdrfnt\projname\hfill\date\hfill\topnum\count0}

    As  a final  instance,  suppose   you  want  an  overcrowded   heading
consisting of two lines; the  first like in \oddevennumbering, the  second
having \autname on the left, \draft in the center, and \date on the  right
(these things have to be \def-ined!), ending whith an \hrule. Then

	\def\crowdedhdng{\topboxes   % figure out same space for headings
			 \let \titlemark=\titlemarkcrwd}

	\def\titlemarkcrwd#1#2{{\rhtypeface\mark{\vbox{
		\hbox to size{\ddvnhdng{#1}{#2}}
		\vskip 2pt
		\hbox to size{\hdrfnt\qquad\autname\hfill\draft\hfill
			      \date\qquad}
		\vskip 3pt
		\hrule height .2pt}}} }

then say \crowdedhdng to  set.  Note use of  \ddvnhdng#1#2; this macro  is
the one that selects the  headings in \oddevennumbering, depending on  the
parity  of  page  (cf  also  \ddvnmsel:   this  one  also  checks  whether
\bothsides).

    In some other cases, the modification shall be simpler; for  instance,
if you don't  like the heading  font (small caps)  and/or the ruler  below
them, you need only redefine \hdrfnt and/or \onelinh.  If headings in caps
are desired, here's an easy way to do it:

\let \temp=\titlemark
\def\titlemark#1#2{\temp{\uppercase{#1}}{\uppercase{#2}}}

4. HEADLINES

			\headline
			\ddvnjust
			\chapterdeclare
			\sectiondeclare
			\subsectiondeclare

    The code producing suitable headings is imbedded in the invocations to
the last three  macros in  this list.  Thus,  for instance,  if a  \bullet
preceeding subsecnum is desired, do:

\def\subsectionbegin#1{\¬
	\subsectiondeclare{\hangindent\indssect\tenpoint\bf$\bullet$\subsecnum\
			   \rm #1
			 }{\subsecnum. #1}}

    Similarly for chapters and sections; formats are rather easily altered. 

5. OTHER PAGE PARAMETERS

    Care was  taken  to  use  (most)  fonts  and  dimensions  via  control
sequences, to make it easy to change things, without rewritting too much.

    For instance, to change  the font used for  running heads, one  simply
sets \def\hdrfnt{\ti} (8-pt italic), and  so on. Similarly, to change  the
space left after chapter headlines, \def\chapbotskip{<dimen>}.

    Most such parameters are defined nearby the macro that invokes them.
		 Counters, Boxes, Files, Counter variables


	You should not touch these, unless you know what you're doing.
In future uses, we will start taking these in decreasing order; so, if
you need a box, start using #0, #1, etc...

Counters							  set
 0	current page number					KERMAC
 7	used by \enumerate, \enumelett				KERMAC
 8	current chapter number					PAPMAC
 9	for temporal computations				KERMAC

Boxes
 6	\chaplistnotes, \seclistnotes				PAPMAC
 7	\setfootnote						PAPMAC
 8	\enumerate, \itemize, \ref, \capitalpar			KERMAC
 9      for temporary computations				KERMAC

Files
 8	\tableofplates	   (title = tofp.tmp,jktofp.tmp)	PAPMAC
 9	\tableofcontents   (title = tofc.tmp,jktofc.tmp)	PAPMAC

Global variables:
 \chapnum		chap. #					PAPMAC
 \sectionnum		section #				PAPMAC
 \subsecnum		sub-    #				PAPMAC
 \rhevenpg		running head for even pgs		PAPMAC
 \rhoddpg		...for odd...				PAPMAC

Counter variables:
 \vareqno		equation #				MATMAC
 \varfig		figure #				PAPMAC
 \varfn			footnote #				PAPMAC
 \varsec		sec #					PAPMAC
 \varssec		subsec #				PAPMAC
 \varstmt		statement #				MATMAC
 \vartab		table #					PAPMAC

Boolean variables:
 \tpage			T or F (\titlepage			PAPMAC
 \ddvnum		T or F (\oddevennumbering		KERMAC

 \junkie, \jnk		temporal variables			KERMAC
			Index of control sequences

    Some of  the  macros are,  in  turn,  defined by  other  macros.   For
instance, if you define \sy and later on use \tenpoint, YOUR definition of
\sy will be lost (and you'll probably start getting strange TEX messages).
The opposite  can well  happen, with  equally disastrous  results.  If  in
doubt, consult  this  index:   it  tells  you  in  which  set  things  get
(re)defined.  The best  solution is probably  to change the  name of  your
control sequence. (To make an index of control sequences \def-ined in  one
or more files, the E macros listed in the appendix are useful).

    Those macros marked  with the  word "loc"  are just  defined and  used
locally within some  macro. We  point out  those macros  wich are  usually
dangerous (or messy) to redefine and(or)  use.  Those, on the other  hand,
marked "par" or "fnt"  are parameters and may  usually be changed  without
problem.

    We do  not  list here  the  control  sequences which  are  handled  as
variables (see previous  section).  If  a macro appears  listed more  than
once, it means its  definition may change within  those sets (perhaps  via
\let:  see errata.txt).


		usable	  internal
		macros	   macros		set

		\¬				KERMAC
		\~				ESPMAC
		\~				KERMAC
		\"				KERMAC
		\"#1				ESPMAC
		\#				KERMAC
		\$				KERMAC
		\%				KERMAC
		\.				PAPMAC
		\:				KERMAC
			\CR			CODMAC	loc
		\Chapter			ESPMAC
		\Chapter			KERMAC
		\Contents			ESPMAC
		\Contents			KERMAC
		\Corollary			ESPMAC
		\Corollary			KERMAC
		\Figure				ESPMAC
		\Figure				KERMAC
		\Lemma				ESPMAC
		\Lemma				KERMAC
		\Notes				ESPMAC
		\Notes				KERMAC
		\Page				ESPMAC
		\Page				KERMAC
		\Pf				MATMAC
		\Plates				ESPMAC
		\Plates				KERMAC
		\Proof				ESPMAC
		\Proof				KERMAC
		\Proposition			ESPMAC
		\Proposition			KERMAC
		\QED				MATMAC
		\Remark				ESPMAC
		\Remark				KERMAC
			\SP			CODMAC	loc
			\TAB			CODMAC	loc
		\Table				ESPMAC
		\Table				KERMAC
		\Theorem			ESPMAC
		\Theorem			KERMAC
			\Tit			PAPMAC	fnt
		\\				CODMAC	loc
		\\				KERMAC
			\addq#1#2		KERMAC
		\addtotofc#1#2#3		PAPMAC
		\addtotofp#1#2			PAPMAC
			\advnce#1		KERMAC
		\anotate#1			PAPMAC
		\appchapterbegin#1		PAPMAC
		\appchapterbeginb#1#2		PAPMAC
		\appsectionbegin#1		PAPMAC
		\appsectionbeginb#1#2		PAPMAC
		\arabicnumbering#1		KERMAC
		\bf				KERMAC	fnt
		\bfootnote#1#2			PAPMAC
		\biggglp			MATMAC
		\bigggrp			MATMAC
		\bigglp				MATMAC
		\biggrp				MATMAC
		\biglp				KERMAC
		\bigrp				KERMAC
		\bnfootnote#1			PAPMAC
			\botfnt			KERMAC	fnt
		\bothsides			KERMAC
		\bottomnumbering		PAPMAC
			\boxh#1			PAPMAC
		\boxit#1			KERMAC
		\bracedef#1#2#3#4		MATMAC
			\bracex			KERMAC
		\btm#1				KERMAC
			\btmnrspace		KERMAC	par
		\bye				KERMAC
		\capitalpar#1#2#3		KERMAC
		\caps				KERMAC	fnt
			\cbotnum		KERMAC
		\cdots				MATMAC
		\cdotss				MATMAC
			\chapmidskip		PAPMAC	par
		\chapfmt			PAPMAC
		\chaplistnotes			PAPMAC
			\chapnumcase#1		PAPMAC
		\chapterbegin#1			PAPMAC
		\chapterbeginb#1#2		PAPMAC
			\chapterdeclare#1#2#3	PAPMAC
		\charfn#1			MATMAC
		\choose				MATMAC
		\chop to#1pt#2			MATMAC
		\comment#1#2			PAPMAC
			\consnum#1		PAPMAC
			\constofc#1#2		PAPMAC
			\constofp#1		PAPMAC
		\cor				MATMAC
		\cos				MATMAC
		\cot				MATMAC
		\cpile#1			KERMAC
		\csc				MATMAC
		\ctr#1				KERMAC
		\ctrchapfmt			PAPMAC
		\ctrcol#1			KERMAC
		\ctrline#1			KERMAC
		\ctrheadline#1			PAPMAC
			\curfont		KERMAC
			\dcount0		KERMAC
		\ddvnchapfmt			PAPMAC
		\ddvnheadline#1			PAPMAC
			\ddvnhdng#1#2		KERMAC
			\ddvnjust#1		PAPMAC
			\ddvnmsel#1#2		KERMAC
		\det				MATMAC
		\diam				MATMAC
		\displaypar#1			KERMAC
		\displayypar#1			KERMAC
			\displayparsize		KERMAC	par
			\displayyparsize	KERMAC	par
			\dispparskip		KERMAC	par
		\dist				MATMAC
		\dnbrace			KERMAC
			\dotablefcontents#1#2#3#4 PAPMAC
		\dunhill			KERMAC  fnt
		\eightpoint			KERMAC
		\emptyset			MATMAC
		\endpage			KERMAC
		\english			KERMAC
		\enumelett#1			KERMAC
		\enumerate#1			KERMAC
			\enumrlfmt		KERMAC
		\enumrnext			KERMAC
			\enumrnfmt		KERMAC
		\enumrind			KERMAC
			\epagesize		KERMAC	par
		\eqalign#1			MATMAC
		\eqalignno#1			MATMAC
		\eqv				MATMAC
		\espanol			KERMAC
		\exp				MATMAC
			\figtab#1#2#3#4#5	PAPMAC
		\figure#1#2			PAPMAC
		\figuref#1#2			PAPMAC
		\footnote#1#2			PAPMAC
			\footnotebar		PAPMAC
			\footntsize		PAPMAC	par
			\footntskip		PAPMAC	par
		\ftatop#1#2#3			PAPMAC
		\ftatoppar#1#2#3		PAPMAC
		\ftctr#1#2#3			PAPMAC
			\ftfmt#1#2#3		PAPMAC
		\fullpages			KERMAC
		\gcd				MATMAC
		\gets				MATMAC
			\grafix			CODMAC	fnt
		\grfx				CODMAC
		\grfxnof			CODMAC
			\hdlbotskip		PAPMAC	par
			\hdltopskip		PAPMAC	par
			\hdrfnt			PAPMAC	fnt
		\headline#1			PAPMAC
		\hjust				KERMAC
		\hmode				KERMAC
			\hshft			KERMAC	par
			\hyph			KERMAC
			\ifnull#1\then#2\else#3	KERMAC
			\ifzero#1\then#2\else#3	KERMAC
			\indentcrownskip	KERMAC	par
		\indentin			KERMAC
		\indenthin			KERMAC
		\indentqin			KERMAC
		\indentparbysize#1		KERMAC
			\indsect		PAPMAC	par
			\indssect		PAPMAC	par
		\inf				MATMAC
		\inivar#1#2			KERMAC
		\it				KERMAC	fnt
		\itemize			KERMAC
		\itemzind			KERMAC
			\itemzfmt		KERMAC
		\izq#1				ESPMAC
			\jpar			KERMAC
		\ldots				MATMAC
		\ldotsm				MATMAC
		\ldotss				MATMAC
			\leadtc			PAPMAC
		\leftset			MATMAC
		\lem				MATMAC
		\lft#1				KERMAC
		\lim				MATMAC
		\liminf				MATMAC
		\limsup				MATMAC
		\lftcol#1			KERMAC
		\ljustline#1			KERMAC
		\ln				MATMAC
			\lnfmt			PAPMAC
			\lntypeface		PAPMAC	fnt
		\log				MATMAC
		\lpile#1			KERMAC
		\mattwo#1#2#3#4			MATMAC
		\max				MATMAC
		\mid#1				KERMAC
		\min				MATMAC
		\mod#1				MATMAC
		\modop				MATMAC
		\ms				KERMAC	fnt
			\neg#1			KERMAC
		\neq				MATMAC
		\neqno				MATMAC
		\neqv				MATMAC
		\nfootnote#1			PAPMAC
		\ninepoint			KERMAC
		\nleqno				MATMAC
		\nlnhdng			PAPMAC
		\nofbreak			CODMAC
			\nofill			CODMAC
		\noheading			KERMAC
		\normalpage			PAPMAC
		\null				KERMAC
			\numonlyrmn		PAPMAC
		\oddevennumbering		PAPMAC
		\onelineheading			PAPMAC
			\onelinh#1		PAPMAC
		\oneside			KERMAC
		\overtext#1			KERMAC
		\osc				MATMAC
		\parunskip			PAPMAC
			\posthdrskip		PAPMAC
		\proofbegin			MATMAC
		\prop				MATMAC
		\psubset			MATMAC
		\psupset			MATMAC
		\qquad				KERMAC
		\ragged				KERMAC
		\ref#1				PAPMAC
			\reffmt#1		PAPMAC
		\refind				PAPMAC
			\refsize		PAPMAC	par
		\rem				MATMAC
			\rfactor		KERMAC	par
		\rhswap				PAPMAC
			\rhtypeface		PAPMAC	fnt
		\rightset			MATMAC
		\rtcol#1			KERMAC
		\rjustline#1			KERMAC
		\rm				KERMAC	fnt
		\romannumbering#1		KERMAC
		\rpile#1			KERMAC
		\rt#1				KERMAC
		\scst				MATMAC
		\scscst				MATMAC
		\sec				MATMAC
		\sectionbegin#1			PAPMAC
		\sectionbeginb#1#2		PAPMAC
			\sectiondeclare#1#2#3	PAPMAC
		\seclistnotes			PAPMAC
			\sectionskip		PAPMAC
			\setfootnote#1#2#3	PAPMAC
			\setq#1#2		KERMAC
			\shftthepage#1		KERMAC
		\sin				MATMAC
		\sl				KERMAC	fnt
		\spose#1			KERMAC
		\stanlogo			MATMAC	fnt
		\stmt#1				MATMAC
		\stmtfnt			MATMAC	fnt
		\subsectionbegin#1		PAPMAC
			\subsectiondeclare#1#2	PAPMAC
		\sup				MATMAC
		\sy				KERMAC	fnt
		\table#1#2			PAPMAC
		\tablef#1#2			PAPMAC
		\tableofcontents#1		PAPMAC
		\tableofplates#1		PAPMAC
		\tan				MATMAC
		\tenfib				KERMAC	fnt
		\teniu				KERMAC	fnt
		\tenpoint			KERMAC
		\tensc				KERMAC	fnt
		\th#1				KERMAC
			\thepage		KERMAC
			\thepage		PAPMAC
			\thevbox#1		KERMAC
		\thm				MATMAC
		\ti				KERMAC	fnt
			\tit			PAPMAC	fnt
			\titlemark		KERMAC
			\titlemark		PAPMAC
			\titlemarkbtm#1#2	PAPMAC
			\titlemarkcrn#1#2	PAPMAC
			\titlemarknln#1#2	PAPMAC
			\titlemarknh#1#2	KERMAC
		\titlepage			PAPMAC
			\titpage		KERMAC
			\titpage		PAPMAC
			\tofcbox#1#2#3		PAPMAC
			\tofcline#1#2#3		PAPMAC
			\tofpline#1#2		PAPMAC
			\tofctypeface		PAPMAC	fnt
		\top#1				KERMAC
		\topboxes 			PAPMAC
			\topnum			PAPMAC	fnt
		\trace				KERMAC
		\trglue				KERMAC
		\trmacro			KERMAC
		\trnorm				KERMAC
		\trule				PAPMAC
		\tt				KERMAC	fnt
		\ttwr				CODMAC	fnt
		\twoline#1#2#3			MATMAC
		\typewrite			CODMAC
		\typnoi				CODMAC
		\undertext#1			KERMAC
		\upbrace			KERMAC
			\usefont#1		KERMAC
			\usereightpoint		KERMAC
			\userninepoint		KERMAC
			\usertenpoint		KERMAC
		\vdots				MATMAC
		\vjust				KERMAC
		\xskip				KERMAC
		\xxskip				KERMAC
		\yskip				KERMAC
		\yyskip				KERMAC
		\{				CODMAC	loc
		\}				CODMAC	loc
			   Appendix: "E" macros

    The following macros  for SAIL editor  E scan files  for \def,  \gdef,
\xdef and  dump  the  names  on  a file  INDMAC  (which  you  must  create
beforehand).  Modify macro  m6 for  those files  you want  to visit;  then
execute it:   Copy the  macros  into some  file  einit.cmd; then  edit  it
moddifying m6 to  contain the names  of your TEX  files; next create  file
INDMAC, then say  <control>x exe<cr>  to the  editor and  finally call  m6
(<con>z m6<cr>).   Don't modify  m1,...,m5.   Last macro  helps  balancing
brackets {} in  your TEX  ms (see commands  α( and  α) in page  22 of  the
"Essential E" manual by Art Samuel).  Good luck.

αxDEFINE m1⊗↔
	αxFIND\def\⊗↔αc
αβ⊗↓

αXDEFINE m2⊗↔
	α*α+αc
αβ⊗↓

αXDEFINE m3⊗↔
	αεINDMAC/e⊗↔αxMARK⊗↔
αβ⊗↓

αXDEFINE m4⊗↔
	αF\⊗↔αkfαk\αs{αk⊗↔α⊗=⊗=⊗=⊗=αzFN⊗↔⊗↔
αβ⊗↓

αXDEFINE m5⊗↔
	αxSTOPONE⊗↔
	αzM1⊗↔α∞αzM2⊗↔αzM3⊗↔α∞αzM4⊗↔
αβ⊗↓

αXDEFINE m6⊗↔
	αβ⊗↔CODMACαAαXREDEFINE FN⊗↔αβK
	αεCODMAC/2P/1L⊗↔
	αZM5⊗↔
	αβ⊗↔ESPMACαAαXREDEFINE FN⊗↔αβK
	αεESPMAC/2P/1L⊗↔
	αZM5⊗↔
	αβ⊗↔KERMACαAαXREDEFINE FN⊗↔αβK
	αεKERMAC/2P/1L⊗↔
	αZM5⊗↔
	αβ⊗↔MATMACαAαXREDEFINE FN⊗↔αβK
	αεMATMAC/2P/1L⊗↔
	αZM5⊗↔
	αβ⊗↔PAPMACαAαXREDEFINE FN⊗↔αβK
	αεPAPMAC/2P/1L⊗↔
	αZM5⊗↔
αβ⊗↓


αXDEFINE TEX⊗↔
	αXPAREN {}⊗↔
	αXLISPSYNTAX 173 (⊗↔
	αXLISPSYNTAX 176 (⊗↔
αβ⊗↓